import employees from '../utils/constant/employees'
import moment from 'moment'
// 利用媒介改变数据
export const turnHireType = function (value) {
  const obj = employees.hireType.find(item => {
    return item.id == value
  })
  return obj ? obj.value : ''
}
// 日期格式化
export const timeformat = function (value) {
  return moment(value).format('YYYY-MM-DD')
}
// 判断当前按钮是否可用
export const btnper = function (value) {
  return !store.getters.userInfo.roles.points.includes(value)
}
